package com.sunseen.intelligencebus

import android.app.Application
import com.avos.avoscloud.AVOSCloud
import com.avos.avoscloud.AVObject
import com.sunseen.intelligencebus.user.Account

class BusApp : Application() {

    companion object {
        lateinit var instance: BusApp
            private set
    }

    override fun onCreate() {
        super.onCreate()
        instance = this
        AVObject.registerSubclass(Account::class.java)
        // 初始化参数依次为 this, AppId, AppKey
        AVOSCloud.initialize(this, "VvNF6fnQS1301XJrQ8tLXWQW-gzGzoHsz", "qQfS5g4YkAf7JQ2eVsMYKkW6")

        // 放在 SDK 初始化语句 AVOSCloud.initialize() 后面，只需要调用一次即可
        AVOSCloud.setDebugLogEnabled(true)
    }
}